import { locations } from "../../../gpu/locations";
export const VertexInput = /*wgsl*/ `
struct VertexInput {
    @builtin(instance_index) index : u32,
    @builtin(vertex_index) VertexID:u32,
    #if ~{def.position}
    @location(${locations.position[1]}) position : vec3<f32>,
    #endif
    #if ~{def.offset}
    @location(${locations.offset[1]}) offset : vec2<f32>,
    #endif
    #if ~{def.normal}
    @location(${locations.normal[1]}) normal : vec3<f32>,
    #endif 
    #if ~{def.texCood0}
    @location(${locations.texCood0[1]}) texCood0 : vec2<f32>,
    #endif 
    #if ~{def.texCood1}
    @location(${locations.texCood1[1]}) texCood1 : vec2<f32>,
    #endif 
    #if ~{def.tangent}
    @location(${locations.tangent[1]}) tangent : vec4<f32>,
    #endif 
    #if ~{def.color}
      #if ~{def.colorF32}
       #if ~{def.colorVec3}
         @location(${locations.color[1]}) color : vec3<f32>,
       #else
         @location(${locations.color[1]}) color : vec4<f32>,
       #endif 
      #else 
        #if ~{def.colorVec3}
          @location(${locations.color[1]}) color : vec3<u32>,
        #else
          @location(${locations.color[1]}) color : vec4<u32>,
        #endif 
      #endif 
    #endif 
    #if ~{def.joints0}
    @location(${locations.joints0[1]}) joints0 : vec4<u32>,//取哪个矩阵
    #endif
    #if ~{def.weights0}
    @location(${locations.weights0[1]}) weights0 : vec4<f32>,//矩阵占的权重
    #endif
    #if ~{def.joints1}
    @location(${locations.joints1[1]}) joint1 : vec4<u32>,
    #endif
    #if ~{def.weight1}
    @location(${locations.weight1[1]}) weight1 : vec4<f32>,
    #endif 
    #if ~{def.pointNormal}
    @location(${locations.pointNormal[1]}) pointNormal : vec3<f32>,
    #endif 
    #if ~{def.uvWidthFactor}
    @location(${locations.uvWidthFactor[1]}) uvWidthFactor : vec4<f32>,
    #endif 
  }`;